home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso
/
shareware
/
music
/
octamed
/
programmers
/
examples
/
example3.a
< prev
next >
Wrap
Text File
|
1994-11-17
|
805b
|
37 lines
; This program shows how to use the modplayer routines in an assembler
; program.
; It loads a file, named 'module' (you can change this if you want),
; and plays it until you press the left mouse button.
; link with modplayer.o and loadmod.o
xref _LoadModule
xref _UnLoadModule
xref _PlayModule
xref _InitPlayer
xref _RemPlayer
section "text",code
movem.l d0-d7/a0-a6,-(sp)
lea modname(pc),a0
jsr _LoadModule(pc)
move.l d0,d7 ;store in d7
jsr _InitPlayer(pc)
move.l d7,a0
jsr _PlayModule(pc)
; WARNING: BUSY WAIT USING THE HARDWARE DIRECTLY. NEVER WRITE CODE
; LIKE THIS IN REAL PROGRAMS (this is just an example) !!!!
waitmb btst #6,$bfe001
bne.s waitmb
jsr _RemPlayer(pc)
move.l d7,a0
jsr _UnLoadModule
movem.l (sp)+,d0-d7/a0-a6
moveq #0,d0
rts
modname dc.b 'module',0
end